//
// Created by PC on 2024/5/23.
//


#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n = 10000;
    bool isP[n+1]{0};
    for (int i = 2; i <=n; ++i)
        isP[i]=1;
    vector<int> primes;
    for (int i = 2; i <= n ; ++i)
    {
        if (isP[i])
            primes.push_back(i);
        for (int j = 0; j < primes.size() && primes[j]*i<=n ; ++j)
        {
            isP[i*primes[j]]=0;
            if(i%primes[j]==0)
                break;
        }
    }
    cout<<primes.size();
    return 0;
}